<?
include_once('../model/SendMail.php');

$result = false;
if(isset($_POST['formname']) && isset($_POST['formemail']) && isset($_POST['formphone']) && isset($_POST['formmessage'])) {
	$name = $_POST['formname'];
	$email = $_POST['formemail'];
	$phone = $_POST['formphone'];
	$mess = $_POST['formmessage'];
	
	$body = '<table><tr><td width="100px">Họ Tên</td><td>'.$name.'</td></tr><tr><td width="100px">Email</td><td>'.$email.'</td></tr><tr><td width="100px">Phone</td><td>'.$phone.'</td></tr><tr><td width="100px">Nội Dung</td><td>'.$mess.'</td></tr></table>';
	
	if(smtpmailer($name.' - Liên Hệ Với Tôi', $body)) {
		$result = true;
	}
}

echo $result;
?>